<?php
/**
 * Created by PHPStorm
 * User: xiest
 * Date: 2021/4/10
 * Email: <939369942@qq.com>
 */
namespace app\controller;
use app\BaseController;

class View extends BaseController
{

    public function h5()
    {
       /* if((!$this->request->isMobile()) && !strpos($this->request->server('HTTP_USER_AGENT'), 'MicroMessenger') && !$this->request->param('inner_frame'))
            return $this->setWidthH5();*/

        return view(public_path().'h5/'.'index.html');
    }


    public function setWidthH5()
    {
        $siteName = systemConfig('site_name');
        $url = $this->request->url(true);
        $url .= (strpos($url, '?') === false ? '?' : '&');
        $url .= 'inner_frame=1';
        return \think\facade\View::fetch('/h5frame', compact('siteName', 'url'));
    }
}